The present invention relates to a device for echo suppression in a handsfree apparatus, particularly for a telephone.
Echo cancellers having adaptive filters for handsfree apparatuses are known in general, the cancellers altering the amplification of controllable amplifiers disposed in the transmitting and receiving paths of the handsfree apparatus in accordance with the speech activity of the near-end and far-end subscribers. In practice, the familiar room-echo cancellers achieve echo attenuations of between 20 dB and 30 dB. Consequently, owing to for example, an adaptive filter length which is too short, imprecise adjustment because of existing noise, or nonlinearities, there remains a residual echo.
To reduce the residual echo, German Patent No. 41 19 936 proposes a nonlinear filter which can also be considered as a further development of the center clipper (see xe2x80x9cDer Fernmeldeingenieurxe2x80x9d, 1/95, p. 32). The disadvantages of this arrangement, however, lie in the nonlinearity of the filter, which results in signal distortion at low levels.
A further possibility for reducing the residual echo is the use of the level balance proposed, for example, in German Patent No. 43 05 256, German Patent No. 39 28 805, European Patent No. 0 415 031 and also described in xe2x80x9cDer Fernmeldeingenieurxe2x80x9d, 10/94, p. 11. In this case, controllable amplifiers are located in the transmitting and receiving paths, respectively. Starting from a quiescent value, the amplifications of the amplifiers are changed in opposite directions, such that the product of the amplifications remains constant. Although the level balance prevents nonlinearities, a disadvantage lies in the fact that, in the quiescent state or during two-way speech, an attenuation is effective in both directions equivalent to half the deviation of the level balance.
European Patent No. 0 471 083, describes a handsfree apparatus having echo cancellers and additional adjustable amplifiers. To control the amplifiers, the received signal and the transmitted signal are evaluated in a control circuit and the amplifiers are switched over between two amplifications.
This arrangement has the disadvantage that the transmitted signal rises in response to parameter changes, and simulates an activity of the near-end subscriber. Although the control circuit was not explained in detail in the patent specification, it can be assumed that the product of both amplifications is kept constant. Consequently, this is a form of level balance in which a high attenuation is set in the receiving path and a low attenuation is set in the transmitting path when the near-end subscriber is speaking. If the far-end subscriber is speaking, the relationships are reversed.
Some disadvantages of this arrangement lie in the fact that, when the near-end subscriber is speaking, he can easily gain the impression that he has a bad connection and, in the case of two-way speech, disturbances arise due to the changeover of the amplification.
On the object of the present invention is to provide an improvement in the room-echo cancellation of handsfree apparatuses, particularly during two-way speech. An algorithm is made available for adjusting the amplification of the two, amplifiers in the transmitting and receiving paths, such that a large additional attenuation is attained for the residual echo without disturbing the impression of natural speech. At the same time, an intention is to prevent erroneous decisions by the control logic due to parameter changes.
An objective is achieved according to the present invention by a device for echo suppression in a handsfree apparatus, particularly for a telephone, the device having an adaptive filter, a control circuit, as well as adjustable amplifiers disposed in the transmitting and receiving paths, the amplification of the amplifiers being controlled by the control circuit with control signals Vin, Vout, the control circuit including a first short-term power estimator which emits a signal Pf at its output as a measure for the power of the received signal Uf from the far-end subscriber. Also provided in the control circuit are one or more further power estimators whose output signals, either individually or in combination, form a measure Pn for the power of the near-end subscriber. The variables Pn and Pf are used to form a first control variable U1=Pn+Pf, as well as a second control variable U2=Pn/Pf. A control logic processes control variables U1, U2 according to the following rules to form output signals Vxcfx84, V1 and V2, wherein S0 and S1 are predetermined threshold values, S1 less than 1 and xcex1, xcex2 less than 1:
if U1 less than S0, then Vxcfx84=0, V1=1 and V2=xcex2;
if U1 greater than S0 and U2 less than S1, then Vxcfx84=0, V1=xcex1 and V2=1;
if U1 greater than S0 and U2 greater than 1/S1, then Vxcfx84=1, V1=1 and V2=xcex2;
if U1 greater than S0 and 1/S1 greater than U2 greater than S1, then Vxcfx84=1, V1=1 and V2=1.
Signals V1 and V2 are supplied in each case to a nonlinear shaping filter allocated to the transmitting and receiving paths of the handsfree apparatus, the output signals Vout and Vin of the shaping filters controlling the amplification of the respective amplifier in proportion to their magnitude, and the control signal Vxcfx84, depending on its level, setting two different time constants xcfx840, xcfx841 of the shaping filter in the transmitting path.
With regard to the method, an objective of the present invention is achieved by a method for echo suppression in a handsfree apparatus with a receiving path, including at least of one controllable amplifier and a loudspeaker, and with a transmitting path composed at least of one controllable amplifier and a microphone, the amplifications VS and VE respectively, of the controllable amplifiers in the transmitting and receiving paths being adapted to the speech activity of the far-end or near-end subscriber and, in order to determine the speech activity of the far-end subscriber, the power Pf of the received signal Uf being determined by a power estimator, the method being characterized by the following features:
a) the speech activity of the near-end subscriber is determined by one or more further power estimators whose output signals, either individually or in combination, represent a measure Pn for the power of the near-end subscriber;
b) starting from the quiescent values VS=1 and VE=xcex2, the amplification of the controllable amplifiers is adjusted when the summation signal U1=Pn+Pf exceeds a predetermined noise threshold S0;
c) if the far-end subscriber is speaking, amplification VS in the transmitting path is set instantaneously to the value xcex1 less than 1 and amplification VE in the receiving path is set instantaneously to the value 1;
d) if the near-end subscriber is speaking, amplification VS in the transmitting path is set to the value 1 and amplification VE in the receiving path is set to the value xcex2 less than 1, the transitions proceeding exponentially with the time constant xcfx841 in the transmitting path and with a time constant independent thereof in the receiving path;
e) if both subscribers are speaking, amplifications VS and VE are equal to 1, the transition in the receiving path being made instantaneously and the transition in the transmitting path being made exponentially with the time constant xcfx841;
f) if neither subscriber is speaking, amplification VS is set to the value 1 and amplification VE is set to the value xcex2, the transitions proceeding exponentially with the time constant xcfx840 greater than xcfx841 in the transmitting path and with a time constant independent thereof in the receiving path.
The amplifications of the controllable amplifiers are adjusted for echo cancellation according to the different speech modes when the summation signal U1=Pn+Pf exceeds a predetermined noise threshold S0, the speech modes xe2x80x9cone-way speechxe2x80x9d by the far-end or near-end subscriber and xe2x80x9ctwo-way speechxe2x80x9d being distinguished with the assistance of control variable U2=Pn/Pf and a predetermined threshold value S1 less than 1. In this context, U2 less than S1 corresponds to speaking by the far-end subscriber, U2 greater than 1/S1 corresponds to speaking by the near-end subscriber and 1/S1 greater than U2 greater than S1 applies to two-way speech.
Signal Pn as a measure for the speech activity of the near-end subscriber is obtained, for example, in the following manner: The device contains a second power estimator which emits a signal PLRM at its output as a measure for the power of output signal ULRM of the loudspeaker-room-microphone system (LRM system), and a third power estimator which is connected to the output of the adaptive filter (model) UM and whose output signal PM is a measure for the power thereof. The adaptive filter is used as a reference and is intended to simulate the pure characteristics of the room. The difference of variables PLRM and PM is formed by a subtraction step, the output signal Pn=PLRM-PM of the subtraction step then being a measure for the speech activity of the near-end subscriber. Furthermore, suitable logic elements form control variables U1 and U2 from variables Pn and Pf.
The further development of the control device is based on the realization that the principle of the level balance must be abandoned if, on one hand, there is to be an impression of natural speech and if, on the other hand, there is to be a large additional attenuation of the residual echo of the echo canceller.
If only the far-end subscriber is active, an attenuation is switched into the transmitting path. At the same time, the amplification in the receiving path is set to 1. If both the near-end and the far-end subscribers are active, then the amplifications in the transmitting and receiving paths are set to 1. If only the near-end subscriber is active, then the amplification in the transmitting path is set to 1, while an attenuation is set in the receiving path.
In the transmitting path, a required attenuation is set instantaneously, while the transition to the amplification of 1 is carried out according to an exponential function with a defined time constant.
In the receiving path, the transition to an attenuation is carried out according to an exponential function and the rise to the amplification of 1 is carried out instantaneously.
Through this form of control, the signals of both subscribers are transmitted without attenuation during two-way speech. This provides an impression of natural speech. The attenuation in the transmitting path can be adjusted independently thereof, resulting in the desired additional suppression of the residual echo.
If there is additionally a noise source in the room of one of the subscribers, then the change in amplification controlled by the speech of the second subscriber may result in the subscriber being left with an unpleasant impression. In such a case, it may be advantageous to control the minimum amplification as a function of the level of the ambient noise in such a way that it rises as there is an increase in the sum of the weighted noise levels from both rooms.
Since the magnitude of the residual echo of the echo canceller depends on the room characteristics and increases, for example, in the case of rooms with strong reverberation, it may be advantageous, in such a case, in such a case to reduce the minimum amplification. The amplification may also be automatically adjusted to the conditions.
A measure of the speech power of the near-end subscriber may be obtained in a conventional manner with the assistance of a power estimator from the adaptation error e.
If greater parameter changes are to be expected in the LRM system, an advantageous embodiment of the present invention provides that a measure for the speech power of the near-end subscriber is obtained as the difference between the output powers of the model and the LRM system, so that the dependence on parameter changes in the LRM system is reduced. The difference should approximate the speech power of the near-end subscriber as well as possible. This is best achieved by square-law rectification.
In the case of greater ambient noise, its power is evaluated as speech activity. In order to prevent this, a measure for the speech power is formed as the difference between an upper power characteristic corresponding approximately to the sum of speech power and noise power, and a lower power characteristic approximately representing a measure for the noise power.
Despite optimization of the time constants of the amplifiers, in the case of two-way speech, it may happen that if the power of the near-end subscriber drops briefly, the control unit will set an attenuation in the amplifier in the transmitting path. To prevent this, an advantageous further development of the present invention provides for bridging such drops in power by a timing element. Whenever two-way speech has been detected, the timing element is started and retains output variables V1, V2 and Vxcfx84 of the control logic constant at the values for two-way speech for a defined delay time, e.g., 0.3 sec., even if the instantaneous control variables correspond to one-way speech. The input variables of the control logic are not evaluated again until after this time has expired.